<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>" />
    
    <title>Struts Hibernate测试页面</title>
  </head>
  
  <body>
  	<div style="width:300px; margin:100px auto;">
  		<html:form action="login.do?m=login" method="post">
  			<html:text property="username"></html:text>
  			<span style="color:red"><html:errors property="error.username.null" /></span>
  			<span style="color:red"><html:errors property="error.username.empty" /></span><br />
  			<html:text property="password"></html:text>
  			<span style="color:red"><html:errors property="error.password.null" /></span>
  			<span style="color:red"><html:errors property="error.password.empty" /></span><br />
  			<html:messages id="login_error" name="error.login.error" message="true">
  				<span style="color:red"><bean:write name="login_error" /></span><br />
  			</html:messages>
  			<html:submit value="login"></html:submit>
  		</html:form>
	</div>
  </body>
</html>
